#include <stdio.h>
#include <string.h>
#include "ns_sdk_soc.h"
#include "ns_sdk_hal.h"


//注意，此段代码可以复制到n300或n900sdk的hello world工程的main.c中去测试，g_flashDriverRAM即loader模式编译出来的
//bin文件转换为数组后的形式。.ld文件可参考此文件夹下的gcc_n300_ilm.ld。

#define BUFFER_SIZE 0x100u  /* Size of data source */

__attribute__ ((section(".flash_driver_ram"))) uint8_t g_flashDriverRAM[] =
{
		0x10, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x48, 0x04, 0x00, 0x00,
		0x13, 0x01, 0x81, 0xfe, 0x23, 0x2a, 0x11, 0x00, 0x23, 0x28, 0x81, 0x00, 0x13, 0x04, 0x81, 0x01,
		0x23, 0x24, 0xa4, 0xfe, 0x23, 0x28, 0x04, 0xfe, 0x23, 0x16, 0x04, 0xfe, 0x23, 0x07, 0x04, 0xfe,
		0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0x50, 0x22, 0x93, 0x05, 0x00, 0x00, 0x03, 0x25, 0x84, 0xfe,
		0xef, 0x00, 0x90, 0x2e, 0x93, 0x05, 0x10, 0x00, 0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0x10, 0x36,
		0x93, 0x07, 0xf0, 0xf9, 0x23, 0x06, 0xf4, 0xfe, 0x93, 0x07, 0xc4, 0xfe, 0x13, 0x06, 0x10, 0x00,
		0x93, 0x85, 0x07, 0x00, 0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0x10, 0x3a, 0x13, 0x07, 0x05, 0x00,
		0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00, 0x23, 0x28, 0xf4, 0xfe, 0x93, 0x07, 0xc4, 0xfe,
		0x13, 0x06, 0x30, 0x00, 0x93, 0x85, 0x07, 0x00, 0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0xd0, 0x4a,
		0x13, 0x07, 0x05, 0x00, 0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00, 0x23, 0x28, 0xf4, 0xfe,
		0x93, 0x05, 0x00, 0x00, 0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0x50, 0x30, 0x93, 0x05, 0x10, 0x00,
		0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0x50, 0x27, 0x83, 0x47, 0xe4, 0xfe, 0x13, 0x97, 0x07, 0x01,
		0x83, 0x47, 0xd4, 0xfe, 0x93, 0x97, 0x87, 0x00, 0xb3, 0x67, 0xf7, 0x00, 0x03, 0x47, 0xc4, 0xfe,
		0xb3, 0xe7, 0xe7, 0x00, 0x23, 0x28, 0xf4, 0xfe, 0x83, 0x27, 0x04, 0xff, 0x13, 0x85, 0x07, 0x00,
		0x83, 0x20, 0x41, 0x01, 0x03, 0x24, 0x01, 0x01, 0x13, 0x01, 0x81, 0x01, 0x67, 0x80, 0x00, 0x00,
		0x13, 0x01, 0x41, 0xfd, 0x23, 0x24, 0x11, 0x02, 0x23, 0x22, 0x81, 0x02, 0x13, 0x04, 0xc1, 0x02,
		0x23, 0x2e, 0xa4, 0xfc, 0x23, 0x2c, 0xb4, 0xfc, 0x23, 0x2a, 0xc4, 0xfc, 0x23, 0x28, 0x04, 0xfe,
		0x23, 0x20, 0x04, 0xfe, 0x83, 0x27, 0x84, 0xfd, 0x23, 0x26, 0xf4, 0xfe, 0x03, 0x27, 0x44, 0xfd,
		0x83, 0x27, 0x84, 0xfd, 0xb3, 0x07, 0xf7, 0x40, 0x93, 0xd7, 0x07, 0x01, 0x23, 0x22, 0xf4, 0xfe,
		0x93, 0x05, 0x00, 0x00, 0x03, 0x25, 0xc4, 0xfd, 0xef, 0x00, 0x10, 0x1f, 0x23, 0x24, 0x04, 0xfe,
		0x6f, 0x00, 0xc0, 0x0e, 0x93, 0x05, 0x10, 0x00, 0x03, 0x25, 0xc4, 0xfd, 0xef, 0x00, 0x10, 0x26,
		0x93, 0x07, 0x60, 0x00, 0x23, 0x00, 0xf4, 0xfe, 0x93, 0x07, 0x04, 0xfe, 0x13, 0x06, 0x10, 0x00,
		0x93, 0x85, 0x07, 0x00, 0x03, 0x25, 0xc4, 0xfd, 0xef, 0x00, 0x10, 0x2a, 0x13, 0x07, 0x05, 0x00,
		0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00, 0x23, 0x28, 0xf4, 0xfe, 0x93, 0x05, 0x00, 0x00,
		0x03, 0x25, 0xc4, 0xfd, 0xef, 0x00, 0x90, 0x22, 0x93, 0x05, 0x10, 0x00, 0x03, 0x25, 0xc4, 0xfd,
		0xef, 0x00, 0xd0, 0x21, 0x93, 0x07, 0x80, 0xfd, 0x23, 0x00, 0xf4, 0xfe, 0x83, 0x27, 0xc4, 0xfe,
		0x93, 0xd7, 0x07, 0x01, 0x93, 0xf7, 0xf7, 0x0f, 0xa3, 0x00, 0xf4, 0xfe, 0x83, 0x27, 0xc4, 0xfe,
		0x93, 0xd7, 0x87, 0x00, 0x93, 0xf7, 0xf7, 0x0f, 0x23, 0x01, 0xf4, 0xfe, 0x83, 0x27, 0xc4, 0xfe,
		0x93, 0xf7, 0xf7, 0x0f, 0xa3, 0x01, 0xf4, 0xfe, 0x93, 0x07, 0x04, 0xfe, 0x13, 0x06, 0x40, 0x00,
		0x93, 0x85, 0x07, 0x00, 0x03, 0x25, 0xc4, 0xfd, 0xef, 0x00, 0x10, 0x23, 0x13, 0x07, 0x05, 0x00,
		0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00, 0x23, 0x28, 0xf4, 0xfe, 0x93, 0x05, 0x00, 0x00,
		0x03, 0x25, 0xc4, 0xfd, 0xef, 0x00, 0x90, 0x1b, 0x03, 0x25, 0xc4, 0xfd, 0xef, 0x00, 0x50, 0x43,
		0x13, 0x07, 0x05, 0x00, 0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00, 0x23, 0x28, 0xf4, 0xfe,
		0x03, 0x27, 0xc4, 0xfe, 0xb7, 0x07, 0x01, 0x00, 0xb3, 0x07, 0xf7, 0x00, 0x23, 0x26, 0xf4, 0xfe,
		0x83, 0x27, 0x84, 0xfe, 0x93, 0x87, 0x17, 0x00, 0x23, 0x24, 0xf4, 0xfe, 0x83, 0x27, 0x84, 0xfe,
		0x03, 0x27, 0x44, 0xfe, 0xe3, 0xe8, 0xe7, 0xf0, 0x93, 0x05, 0x10, 0x00, 0x03, 0x25, 0xc4, 0xfd,
		0xef, 0x00, 0x90, 0x0e, 0x83, 0x27, 0x04, 0xff, 0x63, 0x88, 0x07, 0x00, 0x83, 0x27, 0x04, 0xff,
		0x93, 0xe7, 0x27, 0x00, 0x6f, 0x00, 0x80, 0x00, 0x83, 0x27, 0x04, 0xff, 0x13, 0x85, 0x07, 0x00,
		0x83, 0x20, 0x81, 0x02, 0x03, 0x24, 0x41, 0x02, 0x13, 0x01, 0xc1, 0x02, 0x67, 0x80, 0x00, 0x00,
		0x13, 0x01, 0x41, 0xfd, 0x23, 0x24, 0x11, 0x02, 0x23, 0x22, 0x81, 0x02, 0x13, 0x04, 0xc1, 0x02,
		0x23, 0x20, 0xa4, 0xfe, 0x23, 0x2e, 0xb4, 0xfc, 0x23, 0x2c, 0xc4, 0xfc, 0x23, 0x2a, 0xd4, 0xfc,
		0x23, 0x28, 0x04, 0xfe, 0x23, 0x22, 0x04, 0xfe, 0x83, 0x27, 0x84, 0xfd, 0x93, 0xf7, 0xf7, 0x0f,
		0x23, 0x26, 0xf4, 0xfe, 0x23, 0x24, 0x04, 0xfe, 0x93, 0x05, 0x00, 0x00, 0x03, 0x25, 0x04, 0xfe,
		0xef, 0x00, 0x90, 0x07, 0x6f, 0x00, 0x40, 0x15, 0x03, 0x27, 0xc4, 0xfe, 0x83, 0x27, 0x44, 0xfd,
		0x33, 0x07, 0xf7, 0x00, 0x93, 0x07, 0xf0, 0x0f, 0x63, 0xfc, 0xe7, 0x00, 0x13, 0x07, 0x00, 0x10,
		0x83, 0x27, 0xc4, 0xfe, 0xb3, 0x07, 0xf7, 0x40, 0x23, 0x24, 0xf4, 0xfe, 0x6f, 0x00, 0xc0, 0x00,
		0x83, 0x27, 0x44, 0xfd, 0x23, 0x24, 0xf4, 0xfe, 0x23, 0x26, 0x04, 0xfe, 0x93, 0x05, 0x10, 0x00,
		0x03, 0x25, 0x04, 0xfe, 0xef, 0x00, 0x90, 0x0b, 0x93, 0x07, 0x60, 0x00, 0x23, 0x02, 0xf4, 0xfe,
		0x93, 0x07, 0x44, 0xfe, 0x13, 0x06, 0x10, 0x00, 0x93, 0x85, 0x07, 0x00, 0x03, 0x25, 0x04, 0xfe,
		0xef, 0x00, 0x90, 0x0f, 0x13, 0x07, 0x05, 0x00, 0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00,
		0x23, 0x28, 0xf4, 0xfe, 0x93, 0x05, 0x00, 0x00, 0x03, 0x25, 0x04, 0xfe, 0xef, 0x00, 0x10, 0x08,
		0x93, 0x05, 0x10, 0x00, 0x03, 0x25, 0x04, 0xfe, 0xef, 0x00, 0x50, 0x07, 0x93, 0x07, 0x20, 0x00,
		0x23, 0x02, 0xf4, 0xfe, 0x83, 0x27, 0x84, 0xfd, 0x93, 0xd7, 0x07, 0x01, 0x93, 0xf7, 0xf7, 0x0f,
		0xa3, 0x02, 0xf4, 0xfe, 0x83, 0x27, 0x84, 0xfd, 0x93, 0xd7, 0x87, 0x00, 0x93, 0xf7, 0xf7, 0x0f,
		0x23, 0x03, 0xf4, 0xfe, 0x83, 0x27, 0x84, 0xfd, 0x93, 0xf7, 0xf7, 0x0f, 0xa3, 0x03, 0xf4, 0xfe,
		0x93, 0x07, 0x44, 0xfe, 0x13, 0x06, 0x40, 0x00, 0x93, 0x85, 0x07, 0x00, 0x03, 0x25, 0x04, 0xfe,
		0xef, 0x00, 0x90, 0x08, 0x13, 0x07, 0x05, 0x00, 0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00,
		0x23, 0x28, 0xf4, 0xfe, 0x03, 0x26, 0x84, 0xfe, 0x83, 0x25, 0xc4, 0xfd, 0x03, 0x25, 0x04, 0xfe,
		0xef, 0x00, 0x90, 0x06, 0x13, 0x07, 0x05, 0x00, 0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00,
		0x23, 0x28, 0xf4, 0xfe, 0x93, 0x05, 0x00, 0x00, 0x03, 0x25, 0x04, 0xfe, 0xef, 0x00, 0x00, 0x7f,
		0x03, 0x25, 0x04, 0xfe, 0xef, 0x00, 0xd0, 0x26, 0x13, 0x07, 0x05, 0x00, 0x83, 0x27, 0x04, 0xff,
		0xb3, 0xe7, 0xe7, 0x00, 0x23, 0x28, 0xf4, 0xfe, 0x03, 0x27, 0xc4, 0xfd, 0x83, 0x27, 0x84, 0xfe,
		0xb3, 0x07, 0xf7, 0x00, 0x23, 0x2e, 0xf4, 0xfc, 0x03, 0x27, 0x84, 0xfd, 0x83, 0x27, 0x84, 0xfe,
		0xb3, 0x07, 0xf7, 0x00, 0x23, 0x2c, 0xf4, 0xfc, 0x03, 0x27, 0x44, 0xfd, 0x83, 0x27, 0x84, 0xfe,
		0xb3, 0x07, 0xf7, 0x40, 0x23, 0x2a, 0xf4, 0xfc, 0x83, 0x27, 0x44, 0xfd, 0xe3, 0x96, 0x07, 0xea,
		0x93, 0x05, 0x10, 0x00, 0x03, 0x25, 0x04, 0xfe, 0xef, 0x00, 0x00, 0x71, 0x83, 0x27, 0x04, 0xff,
		0x63, 0x88, 0x07, 0x00, 0x83, 0x27, 0x04, 0xff, 0x93, 0xe7, 0x47, 0x00, 0x6f, 0x00, 0x80, 0x00,
		0x83, 0x27, 0x04, 0xff, 0x13, 0x85, 0x07, 0x00, 0x83, 0x20, 0x81, 0x02, 0x03, 0x24, 0x41, 0x02,
		0x13, 0x01, 0xc1, 0x02, 0x67, 0x80, 0x00, 0x00, 0x13, 0x01, 0xc1, 0xfd, 0x23, 0x20, 0x11, 0x02,
		0x23, 0x2e, 0x81, 0x00, 0x13, 0x04, 0x41, 0x02, 0x23, 0x24, 0xa4, 0xfe, 0x23, 0x22, 0xb4, 0xfe,
		0x23, 0x20, 0xc4, 0xfe, 0x23, 0x2e, 0xd4, 0xfc, 0x23, 0x28, 0x04, 0xfe, 0x23, 0x26, 0x04, 0xfe,
		0x93, 0x05, 0x00, 0x00, 0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0x00, 0x6b, 0x93, 0x05, 0x10, 0x00,
		0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0x80, 0x72, 0x93, 0x07, 0x30, 0x00, 0x23, 0x06, 0xf4, 0xfe,
		0x83, 0x27, 0x04, 0xfe, 0x93, 0xd7, 0x07, 0x01, 0x93, 0xf7, 0xf7, 0x0f, 0xa3, 0x06, 0xf4, 0xfe,
		0x83, 0x27, 0x04, 0xfe, 0x93, 0xd7, 0x87, 0x00, 0x93, 0xf7, 0xf7, 0x0f, 0x23, 0x07, 0xf4, 0xfe,
		0x83, 0x27, 0x04, 0xfe, 0x93, 0xf7, 0xf7, 0x0f, 0xa3, 0x07, 0xf4, 0xfe, 0x93, 0x07, 0xc4, 0xfe,
		0x13, 0x06, 0x40, 0x00, 0x93, 0x85, 0x07, 0x00, 0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0xc0, 0x73,
		0x13, 0x07, 0x05, 0x00, 0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00, 0x23, 0x28, 0xf4, 0xfe,
		0x03, 0x26, 0xc4, 0xfd, 0x83, 0x25, 0x44, 0xfe, 0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0xd0, 0x04,
		0x13, 0x07, 0x05, 0x00, 0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00, 0x23, 0x28, 0xf4, 0xfe,
		0x93, 0x05, 0x00, 0x00, 0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0x40, 0x6a, 0x03, 0x25, 0x84, 0xfe,
		0xef, 0x00, 0x10, 0x12, 0x13, 0x07, 0x05, 0x00, 0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00,
		0x23, 0x28, 0xf4, 0xfe, 0x93, 0x05, 0x10, 0x00, 0x03, 0x25, 0x84, 0xfe, 0xef, 0x00, 0xc0, 0x5f,
		0x83, 0x27, 0x04, 0xff, 0x63, 0x88, 0x07, 0x00, 0x83, 0x27, 0x04, 0xff, 0x93, 0xe7, 0x87, 0x00,
		0x6f, 0x00, 0x80, 0x00, 0x83, 0x27, 0x04, 0xff, 0x13, 0x85, 0x07, 0x00, 0x83, 0x20, 0x01, 0x02,
		0x03, 0x24, 0xc1, 0x01, 0x13, 0x01, 0x41, 0x02, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x17, 0x01, 0x00, 0x00, 0x13, 0x01, 0x41, 0x77, 0x97, 0x02, 0x00, 0x00, 0x93, 0x82, 0x82, 0x03,
		0x73, 0x90, 0x52, 0x30, 0x73, 0x10, 0x20, 0x34, 0x73, 0x10, 0x30, 0x34, 0xef, 0x00, 0x40, 0x04,
		0x73, 0x00, 0x10, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
		0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
		0x73, 0x00, 0x50, 0x10, 0x6f, 0xf0, 0xdf, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x13, 0x01, 0x81, 0xfd, 0x23, 0x22, 0x11, 0x02, 0x23, 0x20, 0x81, 0x02, 0x13, 0x04, 0x81, 0x02,
		0x23, 0x24, 0xa4, 0xfe, 0x23, 0x22, 0xb4, 0xfe, 0x23, 0x20, 0xc4, 0xfe, 0x23, 0x2e, 0xd4, 0xfc,
		0x23, 0x2c, 0xe4, 0xfc, 0x23, 0x28, 0x04, 0xfe, 0x83, 0x27, 0x04, 0xfe, 0x23, 0x26, 0xf4, 0xfe,
		0x03, 0x27, 0x84, 0xfe, 0x93, 0x07, 0x40, 0x00, 0x63, 0x0e, 0xf7, 0x08, 0x03, 0x27, 0x84, 0xfe,
		0x93, 0x07, 0x40, 0x00, 0x63, 0xe0, 0xe7, 0x0a, 0x03, 0x27, 0x84, 0xfe, 0x93, 0x07, 0x30, 0x00,
		0x63, 0x02, 0xf7, 0x06, 0x03, 0x27, 0x84, 0xfe, 0x93, 0x07, 0x30, 0x00, 0x63, 0xe4, 0xe7, 0x08,
		0x03, 0x27, 0x84, 0xfe, 0x93, 0x07, 0x10, 0x00, 0x63, 0x0a, 0xf7, 0x00, 0x03, 0x27, 0x84, 0xfe,
		0x93, 0x07, 0x20, 0x00, 0x63, 0x00, 0xf7, 0x02, 0x6f, 0x00, 0xc0, 0x06, 0x03, 0x26, 0xc4, 0xfd,
		0x83, 0x25, 0x04, 0xfe, 0x03, 0x25, 0x44, 0xfe, 0xef, 0xf0, 0x9f, 0x80, 0x23, 0x28, 0xa4, 0xfe,
		0x6f, 0x00, 0x00, 0x06, 0x83, 0x27, 0xc4, 0xfe, 0x83, 0x26, 0x84, 0xfd, 0x03, 0x26, 0xc4, 0xfd,
		0x93, 0x85, 0x07, 0x00, 0x03, 0x25, 0x44, 0xfe, 0xef, 0xf0, 0x9f, 0x96, 0x23, 0x28, 0xa4, 0xfe,
		0x6f, 0x00, 0x00, 0x04, 0x83, 0x27, 0xc4, 0xfe, 0x83, 0x26, 0x84, 0xfd, 0x03, 0x26, 0xc4, 0xfd,
		0x93, 0x85, 0x07, 0x00, 0x03, 0x25, 0x44, 0xfe, 0xef, 0xf0, 0x1f, 0xb2, 0x23, 0x28, 0xa4, 0xfe,
		0x6f, 0x00, 0x00, 0x02, 0x03, 0x25, 0x44, 0xfe, 0xef, 0xf0, 0x8f, 0xed, 0x23, 0x28, 0xa4, 0xfe,
		0x6f, 0x00, 0x00, 0x01, 0xb7, 0x07, 0x00, 0x80, 0x23, 0x28, 0xf4, 0xfe, 0x13, 0x00, 0x00, 0x00,
		0x83, 0x27, 0x04, 0xff, 0x13, 0x85, 0x07, 0x00, 0x83, 0x20, 0x41, 0x02, 0x03, 0x24, 0x01, 0x02,
		0x13, 0x01, 0x81, 0x02, 0x67, 0x80, 0x00, 0x00, 0x13, 0x01, 0x01, 0xff, 0x23, 0x26, 0x81, 0x00,
		0x13, 0x04, 0x01, 0x01, 0x23, 0x2c, 0xa4, 0xfe, 0x23, 0x2a, 0xb4, 0xfe, 0x23, 0x28, 0xc4, 0xfe,
		0x83, 0x27, 0x44, 0xff, 0x93, 0xf7, 0xc7, 0xff, 0x03, 0x27, 0x84, 0xff, 0xb3, 0x07, 0xf7, 0x00,
		0x03, 0xa7, 0x07, 0x00, 0x83, 0x27, 0x04, 0xff, 0x23, 0xa0, 0xe7, 0x00, 0x13, 0x00, 0x00, 0x00,
		0x03, 0x24, 0xc1, 0x00, 0x13, 0x01, 0x01, 0x01, 0x67, 0x80, 0x00, 0x00, 0x13, 0x01, 0x01, 0xff,
		0x23, 0x26, 0x81, 0x00, 0x13, 0x04, 0x01, 0x01, 0x23, 0x2c, 0xa4, 0xfe, 0x23, 0x2a, 0xb4, 0xfe,
		0x23, 0x28, 0xc4, 0xfe, 0x83, 0x27, 0x44, 0xff, 0x93, 0xf7, 0xc7, 0xff, 0x03, 0x27, 0x84, 0xff,
		0xb3, 0x07, 0xf7, 0x00, 0x03, 0x27, 0x04, 0xff, 0x23, 0xa0, 0xe7, 0x00, 0x13, 0x00, 0x00, 0x00,
		0x03, 0x24, 0xc1, 0x00, 0x13, 0x01, 0x01, 0x01, 0x67, 0x80, 0x00, 0x00, 0x13, 0x01, 0x81, 0xfe,
		0x23, 0x2a, 0x11, 0x00, 0x23, 0x28, 0x81, 0x00, 0x13, 0x04, 0x81, 0x01, 0x23, 0x26, 0xa4, 0xfe,
		0x23, 0x24, 0xb4, 0xfe, 0x23, 0x28, 0x04, 0xfe, 0x93, 0x07, 0x04, 0xff, 0x13, 0x86, 0x07, 0x00,
		0x93, 0x05, 0x00, 0x04, 0x03, 0x25, 0xc4, 0xfe, 0xef, 0xf0, 0x1f, 0xf5, 0x83, 0x27, 0x04, 0xff,
		0x13, 0xf7, 0x77, 0xff, 0x83, 0x27, 0x84, 0xfe, 0x93, 0x97, 0x37, 0x00, 0x93, 0xf7, 0x87, 0x00,
		0xb3, 0x67, 0xf7, 0x00, 0x13, 0x86, 0x07, 0x00, 0x93, 0x05, 0x00, 0x04, 0x03, 0x25, 0xc4, 0xfe,
		0xef, 0xf0, 0xdf, 0xf6, 0x13, 0x00, 0x00, 0x00, 0x83, 0x20, 0x41, 0x01, 0x03, 0x24, 0x01, 0x01,
		0x13, 0x01, 0x81, 0x01, 0x67, 0x80, 0x00, 0x00, 0x13, 0x01, 0xc1, 0xfe, 0x23, 0x28, 0x11, 0x00,
		0x23, 0x26, 0x81, 0x00, 0x13, 0x04, 0x41, 0x01, 0x23, 0x26, 0xa4, 0xfe, 0x23, 0x28, 0x04, 0xfe,
		0x93, 0x07, 0x04, 0xff, 0x13, 0x86, 0x07, 0x00, 0x93, 0x05, 0xc0, 0x04, 0x03, 0x25, 0xc4, 0xfe,
		0xef, 0xf0, 0x9f, 0xee, 0x93, 0x07, 0x04, 0xff, 0x13, 0x86, 0x07, 0x00, 0x93, 0x05, 0xc0, 0x07,
		0x03, 0x25, 0xc4, 0xfe, 0xef, 0xf0, 0x5f, 0xed, 0x83, 0x27, 0x04, 0xff, 0x93, 0xf7, 0x07, 0x02,
		0x63, 0x94, 0x07, 0x00, 0x6f, 0xf0, 0xdf, 0xfc, 0x13, 0x00, 0x00, 0x00, 0x13, 0x06, 0x00, 0x00,
		0x93, 0x05, 0x40, 0x00, 0x03, 0x25, 0xc4, 0xfe, 0xef, 0xf0, 0x5f, 0xef, 0x13, 0x06, 0x30, 0x00,
		0x93, 0x05, 0xc0, 0x00, 0x03, 0x25, 0xc4, 0xfe, 0xef, 0xf0, 0x5f, 0xee, 0x13, 0x06, 0x00, 0x00,
		0x93, 0x05, 0x00, 0x06, 0x03, 0x25, 0xc4, 0xfe, 0xef, 0xf0, 0x5f, 0xed, 0xb7, 0x07, 0x08, 0x00,
		0x13, 0x86, 0x87, 0x00, 0x93, 0x05, 0x00, 0x04, 0x03, 0x25, 0xc4, 0xfe, 0xef, 0xf0, 0x1f, 0xec,
		0xb7, 0x07, 0x03, 0x00, 0x13, 0x86, 0x77, 0x00, 0x93, 0x05, 0x40, 0x06, 0x03, 0x25, 0xc4, 0xfe,
		0xef, 0xf0, 0xdf, 0xea, 0x13, 0x06, 0x00, 0x00, 0x93, 0x05, 0x00, 0x08, 0x03, 0x25, 0xc4, 0xfe,
		0xef, 0xf0, 0xdf, 0xe9, 0x13, 0x00, 0x00, 0x00, 0x83, 0x20, 0x01, 0x01, 0x03, 0x24, 0xc1, 0x00,
		0x13, 0x01, 0x41, 0x01, 0x67, 0x80, 0x00, 0x00, 0x13, 0x01, 0x81, 0xfe, 0x23, 0x2a, 0x11, 0x00,
		0x23, 0x28, 0x81, 0x00, 0x13, 0x04, 0x81, 0x01, 0x23, 0x26, 0xa4, 0xfe, 0x93, 0x87, 0x05, 0x00,
		0xa3, 0x05, 0xf4, 0xfe, 0x23, 0x28, 0x04, 0xfe, 0x93, 0x07, 0x04, 0xff, 0x13, 0x86, 0x07, 0x00,
		0x93, 0x05, 0x00, 0x06, 0x03, 0x25, 0xc4, 0xfe, 0xef, 0xf0, 0x1f, 0xe1, 0x83, 0x47, 0xb4, 0xfe,
		0x63, 0x80, 0x07, 0x02, 0x83, 0x27, 0x04, 0xff, 0x93, 0xe7, 0x17, 0x00, 0x13, 0x86, 0x07, 0x00,
		0x93, 0x05, 0x00, 0x06, 0x03, 0x25, 0xc4, 0xfe, 0xef, 0xf0, 0x5f, 0xe3, 0x6f, 0x00, 0xc0, 0x01,
		0x83, 0x27, 0x04, 0xff, 0x93, 0xf7, 0xe7, 0xff, 0x13, 0x86, 0x07, 0x00, 0x93, 0x05, 0x00, 0x06,
		0x03, 0x25, 0xc4, 0xfe, 0xef, 0xf0, 0x9f, 0xe1, 0x13, 0x00, 0x00, 0x00, 0x83, 0x20, 0x41, 0x01,
		0x03, 0x24, 0x01, 0x01, 0x13, 0x01, 0x81, 0x01, 0x67, 0x80, 0x00, 0x00, 0x13, 0x01, 0xc1, 0xfe,
		0x23, 0x28, 0x11, 0x00, 0x23, 0x26, 0x81, 0x00, 0x13, 0x04, 0x41, 0x01, 0x23, 0x28, 0xa4, 0xfe,
		0x93, 0x87, 0x05, 0x00, 0xa3, 0x07, 0xf4, 0xfe, 0x83, 0x47, 0xf4, 0xfe, 0x63, 0x8c, 0x07, 0x00,
		0x13, 0x06, 0x20, 0x00, 0x93, 0x05, 0x80, 0x01, 0x03, 0x25, 0x04, 0xff, 0xef, 0xf0, 0x1f, 0xdd,
		0x6f, 0x00, 0x40, 0x01, 0x13, 0x06, 0x00, 0x00, 0x93, 0x05, 0x80, 0x01, 0x03, 0x25, 0x04, 0xff,
		0xef, 0xf0, 0xdf, 0xdb, 0x13, 0x00, 0x00, 0x00, 0x83, 0x20, 0x01, 0x01, 0x03, 0x24, 0xc1, 0x00,
		0x13, 0x01, 0x41, 0x01, 0x67, 0x80, 0x00, 0x00, 0x13, 0x01, 0xc1, 0xfd, 0x23, 0x20, 0x11, 0x02,
		0x23, 0x2e, 0x81, 0x00, 0x13, 0x04, 0x41, 0x02, 0x23, 0x22, 0xa4, 0xfe, 0x23, 0x20, 0xb4, 0xfe,
		0x23, 0x2e, 0xc4, 0xfc, 0x23, 0x28, 0x04, 0xfe, 0x23, 0x24, 0x04, 0xfe, 0x93, 0x05, 0x10, 0x00,
		0x03, 0x25, 0x44, 0xfe, 0xef, 0xf0, 0x9f, 0xdb, 0x23, 0x26, 0x04, 0xfe, 0x6f, 0x00, 0x40, 0x08,
		0x93, 0x07, 0x40, 0x1f, 0x23, 0x28, 0xf4, 0xfe, 0x6f, 0x00, 0x40, 0x02, 0x93, 0x07, 0x84, 0xfe,
		0x13, 0x86, 0x07, 0x00, 0x93, 0x05, 0xc0, 0x07, 0x03, 0x25, 0x44, 0xfe, 0xef, 0xf0, 0xdf, 0xd0,
		0x83, 0x27, 0x84, 0xfe, 0x93, 0xf7, 0x07, 0x01, 0x63, 0x8c, 0x07, 0x00, 0x83, 0x27, 0x04, 0xff,
		0x13, 0x87, 0xf7, 0xff, 0x23, 0x28, 0xe4, 0xfe, 0xe3, 0x9a, 0x07, 0xfc, 0x6f, 0x00, 0x80, 0x00,
		0x13, 0x00, 0x00, 0x00, 0x83, 0x27, 0x04, 0xff, 0x63, 0x96, 0x07, 0x00, 0x93, 0x07, 0x00, 0x01,
		0x6f, 0x00, 0x40, 0x09, 0x83, 0x27, 0xc4, 0xfe, 0x03, 0x27, 0x04, 0xfe, 0xb3, 0x07, 0xf7, 0x00,
		0x83, 0xc7, 0x07, 0x00, 0x13, 0x86, 0x07, 0x00, 0x93, 0x05, 0x80, 0x04, 0x03, 0x25, 0x44, 0xfe,
		0xef, 0xf0, 0xdf, 0xcf, 0x83, 0x27, 0xc4, 0xfe, 0x93, 0x87, 0x17, 0x00, 0x23, 0x26, 0xf4, 0xfe,
		0x83, 0x27, 0xc4, 0xfe, 0x03, 0x27, 0xc4, 0xfd, 0xe3, 0xec, 0xe7, 0xf6, 0x93, 0x07, 0x40, 0x1f,
		0x23, 0x28, 0xf4, 0xfe, 0x6f, 0x00, 0x40, 0x02, 0x93, 0x07, 0x84, 0xfe, 0x13, 0x86, 0x07, 0x00,
		0x93, 0x05, 0xc0, 0x07, 0x03, 0x25, 0x44, 0xfe, 0xef, 0xf0, 0x1f, 0xc8, 0x83, 0x27, 0x84, 0xfe,
		0x93, 0xf7, 0x17, 0x00, 0x63, 0x8c, 0x07, 0x00, 0x83, 0x27, 0x04, 0xff, 0x13, 0x87, 0xf7, 0xff,
		0x23, 0x28, 0xe4, 0xfe, 0xe3, 0x9a, 0x07, 0xfc, 0x6f, 0x00, 0x80, 0x00, 0x13, 0x00, 0x00, 0x00,
		0x83, 0x27, 0x04, 0xff, 0x63, 0x96, 0x07, 0x00, 0x93, 0x07, 0x00, 0x01, 0x6f, 0x00, 0x80, 0x00,
		0x93, 0x07, 0x00, 0x00, 0x13, 0x85, 0x07, 0x00, 0x83, 0x20, 0x01, 0x02, 0x03, 0x24, 0xc1, 0x01,
		0x13, 0x01, 0x41, 0x02, 0x67, 0x80, 0x00, 0x00, 0x13, 0x01, 0xc1, 0xfd, 0x23, 0x20, 0x11, 0x02,
		0x23, 0x2e, 0x81, 0x00, 0x13, 0x04, 0x41, 0x02, 0x23, 0x22, 0xa4, 0xfe, 0x23, 0x20, 0xb4, 0xfe,
		0x23, 0x2e, 0xc4, 0xfc, 0x23, 0x28, 0x04, 0xfe, 0x23, 0x24, 0x04, 0xfe, 0x93, 0x05, 0x00, 0x00,
		0x03, 0x25, 0x44, 0xfe, 0xef, 0xf0, 0x9f, 0xc8, 0x23, 0x26, 0x04, 0xfe, 0x6f, 0x00, 0x00, 0x0a,
		0x93, 0x07, 0x40, 0x1f, 0x23, 0x28, 0xf4, 0xfe, 0x13, 0x06, 0x00, 0x00, 0x93, 0x05, 0x80, 0x04,
		0x03, 0x25, 0x44, 0xfe, 0xef, 0xf0, 0x9f, 0xc2, 0x6f, 0x00, 0x40, 0x02, 0x93, 0x07, 0x84, 0xfe,
		0x13, 0x86, 0x07, 0x00, 0x93, 0x05, 0xc0, 0x07, 0x03, 0x25, 0x44, 0xfe, 0xef, 0xf0, 0xdf, 0xbc,
		0x83, 0x27, 0x84, 0xfe, 0x93, 0xf7, 0x07, 0x02, 0x63, 0x8c, 0x07, 0x00, 0x83, 0x27, 0x04, 0xff,
		0x13, 0x87, 0xf7, 0xff, 0x23, 0x28, 0xe4, 0xfe, 0xe3, 0x9a, 0x07, 0xfc, 0x6f, 0x00, 0x80, 0x00,
		0x13, 0x00, 0x00, 0x00, 0x83, 0x27, 0x04, 0xff, 0x63, 0x96, 0x07, 0x00, 0x93, 0x07, 0x00, 0x02,
		0x6f, 0x00, 0xc0, 0x04, 0x93, 0x07, 0x84, 0xfe, 0x13, 0x86, 0x07, 0x00, 0x93, 0x05, 0xc0, 0x04,
		0x03, 0x25, 0x44, 0xfe, 0xef, 0xf0, 0x5f, 0xb8, 0x83, 0x26, 0x84, 0xfe, 0x83, 0x27, 0xc4, 0xfe,
		0x03, 0x27, 0x04, 0xfe, 0xb3, 0x07, 0xf7, 0x00, 0x13, 0xf7, 0xf6, 0x0f, 0x23, 0x80, 0xe7, 0x00,
		0x83, 0x27, 0xc4, 0xfe, 0x93, 0x87, 0x17, 0x00, 0x23, 0x26, 0xf4, 0xfe, 0x83, 0x27, 0xc4, 0xfe,
		0x03, 0x27, 0xc4, 0xfd, 0xe3, 0xee, 0xe7, 0xf4, 0x93, 0x07, 0x00, 0x00, 0x13, 0x85, 0x07, 0x00,
		0x83, 0x20, 0x01, 0x02, 0x03, 0x24, 0xc1, 0x01, 0x13, 0x01, 0x41, 0x02, 0x67, 0x80, 0x00, 0x00,
		0x13, 0x01, 0x81, 0xfe, 0x23, 0x2a, 0x11, 0x00, 0x23, 0x28, 0x81, 0x00, 0x13, 0x04, 0x81, 0x01,
		0x23, 0x24, 0xa4, 0xfe, 0x23, 0x28, 0x04, 0xfe, 0xa3, 0x07, 0x04, 0xfe, 0x93, 0x05, 0x10, 0x00,
		0x03, 0x25, 0x84, 0xfe, 0xef, 0xf0, 0x9f, 0xd5, 0x93, 0x07, 0x50, 0x00, 0xa3, 0x07, 0xf4, 0xfe,
		0x93, 0x07, 0xf4, 0xfe, 0x13, 0x06, 0x10, 0x00, 0x93, 0x85, 0x07, 0x00, 0x03, 0x25, 0x84, 0xfe,
		0xef, 0xf0, 0x9f, 0xd9, 0x13, 0x07, 0x05, 0x00, 0x83, 0x27, 0x04, 0xff, 0xb3, 0xe7, 0xe7, 0x00,
		0x23, 0x28, 0xf4, 0xfe, 0x93, 0x07, 0xf4, 0xfe, 0x13, 0x06, 0x10, 0x00, 0x93, 0x85, 0x07, 0x00,
		0x03, 0x25, 0x84, 0xfe, 0xef, 0xf0, 0x5f, 0xea, 0x13, 0x07, 0x05, 0x00, 0x83, 0x27, 0x04, 0xff,
		0xb3, 0xe7, 0xe7, 0x00, 0x23, 0x28, 0xf4, 0xfe, 0x83, 0x47, 0xf4, 0xfe, 0x93, 0xf7, 0x17, 0x00,
		0x63, 0x84, 0x07, 0x00, 0x6f, 0xf0, 0x1f, 0xfd, 0x13, 0x00, 0x00, 0x00, 0x93, 0x05, 0x00, 0x00,
		0x03, 0x25, 0x84, 0xfe, 0xef, 0xf0, 0x9f, 0xce, 0x83, 0x27, 0x04, 0xff, 0x63, 0x88, 0x07, 0x00,
		0x83, 0x27, 0x04, 0xff, 0x93, 0xe7, 0x17, 0x00, 0x6f, 0x00, 0x80, 0x00, 0x83, 0x27, 0x04, 0xff,
		0x13, 0x85, 0x07, 0x00, 0x83, 0x20, 0x41, 0x01, 0x03, 0x24, 0x01, 0x01, 0x13, 0x01, 0x81, 0x01,
		0x67, 0x80, 0x00, 0x00, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08,
		0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08,
		0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08,
		0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08,
		0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08,
		0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08,
		0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08,
		0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08, 0x09, 0x53, 0x67, 0x08,
		0x09, 0x53, 0x67, 0x08,
};




typedef int (*tpfFLASH_DRV_Init)     (uint32_t *spi_base);
typedef int (*tpfFLASH_DRV_Erase)    (uint32_t *spi_base, uint32_t start_addr, uint32_t end_addr);
typedef int (*tpfFLASH_DRV_Write)     (uint32_t *spi_base, uint8_t* buffer, uint32_t offset, uint32_t count);
typedef int (*tpfFLASH_DRV_Read)   (uint32_t *spi_base, uint8_t* buffer, uint32_t offset, uint32_t count);

typedef struct
{
    tpfFLASH_DRV_Init       pfFLASH_DRV_Init;
    tpfFLASH_DRV_Erase      pfFLASH_DRV_Erase;
    tpfFLASH_DRV_Write      pfFLASH_DRV_Write;
    tpfFLASH_DRV_Read       pfFLASH_DRV_Read;
} tFlashDriverAPIInfo;

tFlashDriverAPIInfo *g_pFlashDriverAPIRAM = NULL;

#define DEBUG_INFO          (1)

/*==== Loader ====*/
#define ERASE_CMD           (1)
#define WRITE_CMD           (2)
#define READ_CMD            (3)
#define PROBE_CMD           (4)

#define TEST_ERASE_SIZE     (0x10000)
#define TEST_OFFSET         (0x00)
#define TEST_COUNT          (512)

uint8_t write_buf[TEST_COUNT] = {0};
uint8_t read_buf[TEST_COUNT] = {0};

void data_init(uint8_t* buf, uint32_t len)
{
    for (int i = 0;i < len;i++) {
        buf[i] = i + 1;
    }
}

int memory_compare(uint8_t* src, uint8_t* dst, uint32_t len)
{
    while (len--) {
        if(*src++ != *dst++) {
            return -1;
        }
    }
    return 0;
}

void main(void)
{

	printf("n300\r\n");

	g_pFlashDriverAPIRAM = (tFlashDriverAPIInfo *)g_flashDriverRAM;

    g_pFlashDriverAPIRAM->pfFLASH_DRV_Init   = (tpfFLASH_DRV_Init)  ((uint32_t)g_flashDriverRAM + (uint32_t)(g_pFlashDriverAPIRAM->pfFLASH_DRV_Init));
    g_pFlashDriverAPIRAM->pfFLASH_DRV_Erase  = (tpfFLASH_DRV_Erase) ((uint32_t)g_flashDriverRAM + (uint32_t)(g_pFlashDriverAPIRAM->pfFLASH_DRV_Erase));
    g_pFlashDriverAPIRAM->pfFLASH_DRV_Write  = (tpfFLASH_DRV_Write) ((uint32_t)g_flashDriverRAM + (uint32_t)(g_pFlashDriverAPIRAM->pfFLASH_DRV_Write));
    g_pFlashDriverAPIRAM->pfFLASH_DRV_Read   = (tpfFLASH_DRV_Read)  ((uint32_t)g_flashDriverRAM + (uint32_t)(g_pFlashDriverAPIRAM->pfFLASH_DRV_Read));

    int flash_id = 0;
    int retval = 0;

    /* flash loader in/out params */
    uint32_t *spi_base = (uint32_t*)0xF0040000;//fuxi2360 v1r3
    uint32_t params1 = 0x00;
    uint32_t params2 = 0x00;
    uint32_t params3 = 0x00;

    /* data init */
    data_init(write_buf, TEST_COUNT);

    /* flash init */
    flash_id =  g_pFlashDriverAPIRAM->pfFLASH_DRV_Init(spi_base);
    #if DEBUG_INFO
    printf("The current Flash ID is %#x\r\n", flash_id);
    #endif

    /* flash erase */
    params1 = TEST_OFFSET;//start_addr
    params2 = TEST_OFFSET + TEST_ERASE_SIZE;//end_addr
    retval = g_pFlashDriverAPIRAM->pfFLASH_DRV_Erase(spi_base, params1, params2);
    if (retval) {
        #if DEBUG_INFO
        printf("The erase error code\r\n");
        #endif
    } else {
        #if DEBUG_INFO
        printf("Erase success\r\n");
        #endif
    }

    /* flash write */
    params1 = (uint32_t)write_buf;//buffer
    params2 = TEST_OFFSET;//offset
    params3 = TEST_COUNT;//count
    g_pFlashDriverAPIRAM->pfFLASH_DRV_Write (spi_base, (uint8_t* )params1, params2, params3);
    if (retval) {
        #if DEBUG_INFO
        printf("The write error code\r\n");
        #endif
    } else {
        #if DEBUG_INFO
        printf("Write success\r\n");
        #endif
    }

    /* flash read */
    params1 = (uint32_t)read_buf;//buffer
    params2 = TEST_OFFSET;//offset
    params3 = TEST_COUNT;//count
    g_pFlashDriverAPIRAM->pfFLASH_DRV_Read(spi_base, (uint8_t* )params1, params2, params3);
    if (retval) {
        #if DEBUG_INFO
        printf("The read error code\r\n");
        #endif
    } else {
        #if DEBUG_INFO
        printf("read success\r\n");
        #endif
    }

    /* verify */
    if (memory_compare(write_buf, read_buf, TEST_COUNT)) {
        #if DEBUG_INFO
        printf("Test fail\r\n");
        #endif
    } else {
        #if DEBUG_INFO
        printf("Test pass\r\n");
        #endif
    }

    while (1) {}


}

